/*******************************************************************************
  * Copyright(c) 2023 Levetop Semiconductor Co.,Led. All rights reserved.
  * @file     slideMenu.h
  * @author   UartTFT Application Team
  * @version  V0.0.1
  * @date     2023-01-04
  * @brief    This file contains the functions prototypes for the UartTFT
  *           Application display firmware.
 ********************************************************************************/

#ifndef SLIDEMENU_H_
#define SLIDEMENU_H_

#include "type.h"
#include "module_select.h"

/*sliding menu*/
typedef struct
{
	uint16_t Code;	// Function code
	uint8_t len;	// lenght
	uint16_t p_add; // variable pointer
	uint16_t Xs;	// Upper left corner coordinate
	uint16_t Ys;
	uint16_t Xe; // Lower right corner coordinate
	uint16_t Ye;
	uint16_t L1;
	uint16_t L2;
	uint8_t dir;
	uint16_t frontID; // foreground picture ID
	uint16_t bgID;	  // background picture ID
	uint8_t flag;
	uint16_t V_max;
	uint16_t V_min;
	uint16_t step;
	int16_t pos; // For recording location

} SldMenu_Info;

extern SldMenu_Info gSldMenu_Info[SLDMENU_SIZE];
//extern uint8_t SLDMfirsttouch;
extern uint8_t sldmenu_count, sldmenu_num;
extern uint8_t sldmenu_flag;
extern uint8_t sld_mum;
extern uint8_t V_dev;
extern uint16_t lastx, lasty, Sldw, Sldh;
extern uint16_t slide_wmax;

extern void dp_menu(uint8_t num);
extern void DL_menu(uint8_t num);
extern void slideMenu(void);

#endif /* SLIDEMUNE_H_ */
